﻿#ifndef HTTPHELPER_H
#define HTTPHELPER_H

#include <QObject>


/**
 * HTTP 下载工具
 * @brief The HttpHelper class
 */
class HttpHelper : public QObject
{
    Q_OBJECT
public:
    explicit HttpHelper(QObject *parent = nullptr);


public:
    /**
     * 下载文件
     * @brief downloadFileFromURL
     * @param url 下载路径
     * @param filePath 下载到本地的位置
     * @param timeout 超时时间
     * @return
     */
    bool downloadFileFromURL(const QString &url, const QString &filePath, int timeout = -1);



public:
    static HttpHelper& INSTANCE();


signals:

};

#endif // HTTPHELPER_H
